# FROM python:3.11-slim
# RUN apt-get update && apt-get install -y \
#     wget gnupg jq \
#     && wget -qO- https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
#     && echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list \
#     && apt-get update \
#     && apt-get install -y google-chrome-stable \
#     && rm -rf /var/lib/apt/lists/*

# # 安装 Python 依赖（固定版本）
# COPY requirements.txt /tmp/
# RUN pip install --no-cache-dir -r /tmp/requirement.txt -i https://mirrors.aliyun.com/pypi/simple

# # 创建运行用户
# RUN useradd -m -u 1000 kimi && mkdir -p /app && chown kimi:kimi /app
# USER kimi
# WORKDIR /app
# ENV PYTHONUNBUFFERED=1

# CMD ["tail","-f","/dev/null"]   # 占位，由 docker-compose 覆盖



FROM python:3.11-slim

WORKDIR /app

# 安装系统依赖
RUN apt-get update && apt-get install -y --no-install-recommends \
    gcc \
    libc6-dev \
    && rm -rf /var/lib/apt/lists/*

# 复制依赖清单
COPY requirements.txt .

# 安装Python依赖
RUN pip install --no-cache-dir -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple

# 暴露端口
EXPOSE 8000

# 启动命令
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
